package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.mch_member_exempt;
import com.ymttest.database.model.godmch.mch_member_exemptExample;
import com.ymttest.database.model.godmch.mch_member_exemptKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface mch_member_exemptMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @SelectProvider(type=mch_member_exemptSqlProvider.class, method="countByExample")
    int countByExample(mch_member_exemptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @DeleteProvider(type=mch_member_exemptSqlProvider.class, method="deleteByExample")
    int deleteByExample(mch_member_exemptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @Delete({
        "delete from mch_member_exempt",
        "where mchId = #{mchId,jdbcType=INTEGER}",
          "and mobile = #{mobile,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(mch_member_exemptKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @Insert({
        "insert into mch_member_exempt (mchId, mobile, ",
        "exemptStatus, createTime, ",
        "updateTime)",
        "values (#{mchId,jdbcType=INTEGER}, #{mobile,jdbcType=VARCHAR}, ",
        "#{exemptStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(mch_member_exempt record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @InsertProvider(type=mch_member_exemptSqlProvider.class, method="insertSelective")
    int insertSelective(mch_member_exempt record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @SelectProvider(type=mch_member_exemptSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="mchId", property="mchId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="exemptStatus", property="exemptStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<mch_member_exempt> selectByExample(mch_member_exemptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @Select({
        "select",
        "mchId, mobile, exemptStatus, createTime, updateTime",
        "from mch_member_exempt",
        "where mchId = #{mchId,jdbcType=INTEGER}",
          "and mobile = #{mobile,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="mchId", property="mchId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="exemptStatus", property="exemptStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    mch_member_exempt selectByPrimaryKey(mch_member_exemptKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @UpdateProvider(type=mch_member_exemptSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") mch_member_exempt record, @Param("example") mch_member_exemptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @UpdateProvider(type=mch_member_exemptSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") mch_member_exempt record, @Param("example") mch_member_exemptExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @UpdateProvider(type=mch_member_exemptSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(mch_member_exempt record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_member_exempt
     *
     * @mbggenerated Thu May 21 11:38:39 CST 2020
     */
    @Update({
        "update mch_member_exempt",
        "set exemptStatus = #{exemptStatus,jdbcType=INTEGER},",
          "createTime = #{createTime,jdbcType=TIMESTAMP},",
          "updateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where mchId = #{mchId,jdbcType=INTEGER}",
          "and mobile = #{mobile,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(mch_member_exempt record);
}